#!/usr/bin/env groovy

node {

    withCredentials([
        certificate(keystoreVariable: 'MY_KEYSTORE',
                    aliasVariable: 'KEYSTORE_ALIAS',
                    passwordVariable: 'KEYSTORE_PASSWORD',
                    credentialsId: 'my-certificate')])
    {
        // check that the credentials are there
        if (isUnix()) sh './basicsPipeline-step1.sh'
        else bat 'basicsPipeline-step1.bat'
    }

    // check that the credentials are gone
    if (isUnix()) sh './basicsPipeline-step2.sh'
    else bat 'basicsPipeline-step2.bat'

}